package com.zx.cloud.model.response;

import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;

import io.swagger.annotations.ApiModelProperty;
import lombok.EqualsAndHashCode;
import lombok.ToString;

/**
 * @author Alex
 */
@ToString(callSuper = true)
@EqualsAndHashCode
@JsonInclude(JsonInclude.Include.NON_NULL)
@JsonIgnoreProperties(value = {"hibernateLazyInitializer", "handler", "fieldHandler"}, ignoreUnknown = true)
public class RestfulResponse implements Response {
	
    private static final long serialVersionUID = -7443304902819898146L;

    public static final int DEFAULT_OK = 20000;

    /**
     * [M] 平台状态码
     */
    @JsonProperty("code")
    @ApiModelProperty(value = "平台状态码", example = "20000")
    private int code = DEFAULT_OK;
    
    /**
     * [M] 平台状态码
     */
    @JsonProperty("msg")
    @ApiModelProperty(value = "消息", example = "错误")
    private String msg;
    
    /**
     * [M] 平台状态码
     */
    @JsonProperty("details")
    @ApiModelProperty(value = "详情", example = "系统错误")
    private Object details ;
    
	public String getMsg() {
		return msg;
	}

	public void setMsg(String msg) {
		this.msg = msg;
	}

	public Object getDetails() {
		return details;
	}

	public void setDetails(Object details) {
		this.details = details;
	}

	public int getCode() {
		return code;
	}

	public void setCode(int code) {
		this.code = code;
	}
    
}
